package net.adetech.crj.service;

import net.adetech.crj.dao.AppointmentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service("appointment.use")
public class UseAppointmentService implements BaseService {
    @Autowired
    AppointmentMapper appointmentMapper;
    @Override
    public Map<String, Object> invoke(Map<String, Object> params) {
        String idList[] = ((String)params.get("idList")).split(",");
        for (String appointmentId:idList
             ) {
            appointmentMapper.updateAppointmentState(appointmentId,"3");
        }
        return null;
    }
}
